home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / x25 / nrs.shar.Z / nrs.shar / x25hosts.SH < prev    next >
Encoding:
Text File  |  1990-04-27  |  1.0 KB  |  46 lines

  1. case $CONFIG in
  2.     '') . config.sh ;;
  3. esac
  4. outputfile=x25hosts.cf
  5. rm -f $outputfile.$$
  6. echo "Creating $outputfile (with variable substitutions)"
  7. if cat >$outputfile.$$ <<!GROK!THIS!
  8. # RCSid[] = "@(#)$Header: x25hosts.SH,v 3.0 86/09/26 10:14:04 pb Rel $"
  9. #
  10. ##################################################
  11. ##################################################
  12. ##############
  13. ############## configure for /etc/x25hosts
  14. ##############
  15. ##################################################
  16. ##################################################
  17.  
  18. # the directory to search
  19.  
  20. directory $datadir
  21.  
  22. # add comment header
  23. comment hdr.file
  24.  
  25. # output format
  26.  
  27. output x25hosts uk.ac.
  28.  
  29. # we only want X29 connections on JANET
  30.  
  31. context X29 janet
  32. !GROK!THIS!
  33. then if cmp $outputfile $outputfile.$$ > /dev/null 2>& 1
  34.     then
  35.         rm -f $outputfile.$$
  36.         echo "    " $outputfile not affected
  37.     elif mv $outputfile.$$ $outputfile
  38.     then
  39.         echo "    " $outputfile updated
  40.     else
  41.         echo "+++    " $outputfile left in $outputfile.$$
  42.     fi
  43. else
  44.     echo "    " Failed to create $outputfile.$$
  45. fi
  46.